<?php

namespace App\Http\Repository;

use App\User;

class UserRepository
{
    private $user;

    public function __construct(User $user)
    {
        $this->user = $user;
    }

    //得到用户的 id | name lists
    public function getUsersByLists()
    {
        return $this->user
            ->lists('name', 'id');
    }
}